import request from "@/http/request";

// 全部企业
export function getAllEnterprise(params) {
  return request.get("/client/enterprise/allEnterprise", params);
}

// 企业成员列表
export function getEnterpriseUserList(params) {
  return request.get("/client/enterprise/enterpriseUserList", params);
}

// 法人变更
export function postChangeOfLegalPerson(data) {
  return request.post("/client/enterprise/changeOfLegalPerson", data);
}

// 转让管理员
export function changeOfAdmin(data) {
  return request.post("/client/enterprise/changeOfAdmin", data);
}

// 发送转让管理员账号的验证码
export function getSmsPhoneCode(data) {
  const formData = new FormData();
  formData.set("phone", data.phone);
  return request.post("/client/signUser/getSmsPhoneCode", formData);
}

// 添加成员
export function postAddenterpriseUser(data) {
  return request.post("/client/enterprise/addenterpriseUser", data);
}

// 删除成员
export function getEnterpriseUserDel(params) {
  return request.get("/client/enterprise/enterpriseUserDel", params);
}

// 邀请列表
export function getInvitationList(params) {
  return request.get("/client/enterprise/invitationList", params);
}

// 邀请列表审核
export function getInvitationListState(params) {
  return request.get("/client/enterprise/invitationListState", params);
}

// 企业章列表
export function getEnterpriseSealList(params) {
  return request.get("/client/enterprise/enterpriseSealList", params);
}

// 删除印章
export function deleteSeal(data) {
  return request.get("/client/enterprise/deleteSeal", data);
}

// 添加印章使用人
export function addSealUser(data) {
  return request.post("/client/enterprise/addSealUser", data);
}

// 添加印章审批人
export function addSealApproval(data) {
  return request.post("/client/enterprise/addSealApproval", data);
}

// 印章审核和使用权限删除
export function deleteUserSealJurisdiction(params) {
  return request.get("/client/enterprise/deleteUserSealJurisdiction", params);
}

// 印章审核和使用权限列表
export function userSealJurisdictionList(params) {
  return request.get("/client/enterprise/userSealJurisdictionList", params);
}

// 添加法人章
export function addCorporateSeal(data) {
  return request.post("/client/enterprise/addCorporateSeal", data);
}

// 添加企业章
export function addLegalPersonSeal(data) {
  return request.post("/client/enterprise/addLegalPersonSeal", data);
}

// 企业章预览
export function previewSeal(data) {
  return request.post("/app/signEnterprise/previewSeal", data);
}